<!DOCTYPE html>
<html lang="zh">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>家谱展示</title>
  <link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="family-tree"></div>
<script src="genealogy.js"></script>
</body>
<style>
    /* 基础样式 */
    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        background-color: #f4f4f4;
    }

    /* 家谱容器 */
    #family-tree {
        width: 100%;
        max-width: 1200px;
        margin: 50px auto;
        position: relative;
    }

    /* 节点样式 */
    .node {
        position: relative;
        display: inline-block;
        text-align: center;
        margin: 10px;
    }

    .node-circle {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background-color: red;
        display: inline-block;
        margin-right: 5px;
    }

    .node-name {
        font-size: 14px;
        color: #333;
    }

    /* 连线样式 */
    .line {
        position: absolute;
        width: 100%;
        height: 2px;
        background-color: black;
    }

    .line-vertical {
        transform: rotate(90deg);
        top: 50%;
        left: 50%;
        margin-left: -1px; /* 对齐中心 */
    }

    .line-horizontal {
        top: 50%;
        left: 0;
        right: 0;
    }
</style>
</html>